{extend name="public:layout" /}
{block name="title"}流水管理{/block}
{block name="head"}{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                {notempty name="Request.param.myaccount"}
                <li><a href="{:url('User/index',['utype'=>'member'])}">会员列表</a></li>
                {/notempty}
                <li><i class="fa fa-hand-o-right"></i> 会员流水列表</li>
            </ol>
        </div>
        <div class="ibox-content">
            <div class="toolbar">
                {notempty name="Request.param.myaccount"}
                <div class="pull-left">
                    <a class="btn btn-primary" href="{:url('changeData',['member_username'=>$Request.param.searchText])}">
                        <i class="fa fa-plus"></i>&nbsp;人工调节
                    </a>
                    <span>当前用户可用资金：{$userMemberInfo.user_money}元  可用积分{$userMemberInfo.pay_points}</span>
                </div>
                {/notempty}
                <div class="pull-right">
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <select class="form-control" name="searchKeyEvent">
                                <option selected>所有流水</option>
                                {foreach $changeType as $key=>$value}
                                <option value="{$key}" {eq name="query['searchKeyEvent']" value="$key"}selected{/eq}>{$value}</option>
                                {/foreach}
                            </select>
                        </div>
                        {empty name="Request.param.myaccount"}
                        <div class="form-group">
                            <div class="input-group">
                                <input class="form-control" name="searchText" type="text" value="{$query['searchText']}" placeholder="操作用户">
                            </div>
                        </div>
                        {/empty}
                        <button type="submit" class="btn btn-info">
                            <i class="fa fa-search"></i> 搜索
                        </button>
                    </form>
                </div>
                <div class="clearfix"></div>
            </div>
        </div>
    </div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th width="50">#</th>
            <th>用户名</th>
            <th>金额变动</th>
            <th>可用金额</th>
            <th>积分变动</th>
            <th>可用积分</th>
            <th>变动事件</th>
            <th>变动时间</th>
            <th>变动描述</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo"}
        <tr>
            <td>{$vo.id}</td>
            <td>{$vo.member_username}</td>
            <td>{$vo.user_money}</td>
            <td>{$vo.user_money_log}</td>
            <td>{$vo.pay_points}</td>
            <td>{$vo.pay_points_log}</td>
            <td>{$vo.change_type_text}</td>
            <td>{$vo.change_time|date='Y-m-d H:i',###}</td>
            <td>{$vo.change_desc}</td>
        </tr>
        {/volist}
        </tbody>
    </table>
    <div class="page-bar">{$list->render()}</div>
    <div class="clearfix"></div>
</div>
{/block}